home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
C128
/
TERMS
/
BTP12822.SFX
/
.img strip
(
.txt
)
next >
Wrap
Commodore BASIC
|
1990-02-12
|
2KB
|
54 lines
0 REM W. ANTHONY MARSH, BCS/CUG, 5/25/86
1 FORI=1TO255:CLOSEI:NEXT
5 PRINT"[147] .IMG STRIPPER "
10 PRINT"INSERT DISK, THEN PRESS RETURN[146]." :WAIT 203,1:REM C64 KEYPRESS MATRIX
15 OPEN15,8,15,"I0":INPUT#15,E,E$,T,S:IFE<20THEN 30
20 PRINT"DISK ERROR#"E"("E$")":PRINT"AT TRACK"T", SECTOR"S
25 PRINT"CHECK DISK AND DRIVE. [208]RESS RETURN[146] WHEN READY.":WAIT 203,1:RUN
30 PRINT"ENTER FILENAME WITH EXACT SYNTAX; DON'T USE WILCARDS SUCH AS * OR ?"
32 F$="":POKE198,0:INPUT"FILENAME.IMG";F$
35 OPEN8,8,0,"$0:"+F$
41 A$="":FORI=1TO32:GOSUB256
42 A$=A$+D$:NEXT
43 B$="":FORI=1TO32:GOSUB256
44 B$=B$+D$:NEXT
45 C$="":FORI=1TO4:GOSUB256
46 C$=C$+D$:NEXT
47 LOW=ASC(MID$(B$,3,1)):HIGH=ASC(MID$(B$,4,1)):B=LOW+256*HIGH
48 LOW=ASC(MID$(C$,3,1)):HIGH=ASC(MID$(C$,4,1)):C=LOW+256*HIGH
49 IFC=3341THENPRINTF$" IS NOT ON THIS DISK.":PRINT"CHECK SPELLING.":E=62
50 IFB>C THEN PRINT"***NOT ENOUGH BLOCKS LEFT TO WRITE FILE.":E=72
55 CLOSE8:IF E>19 THEN 25
60 F=LEN(F$):IFRIGHT$(F$,4)=".IMG"THEN70
61 PRINTF$" DOES NOT APPEAR TO BE AN .IMG FILE."
62 INPUT"DO YOU WANT TO GO AHEAD ANYWAY Y[157][157][157]";Y$
63 IF Y$="Y" OR Y$="[217]" THEN 65
64 PRINT"***TRANSLATION ABORTED.":END
65 IF F=0 THEN END
66 IF F<16 THENOF$=F$+"."
67 IF F=16 THENOF$=LEFT$(F$,15)+"."
68 GOTO75
70 OF$=LEFT$(F$,F-4)
75 OPEN8,8,8,"0:"+F$
77 GOSUB256:LOW=ASC(D$):GOSUB256:HIGH=ASC(D$):RANGE=LOW+256*HIGH
80 I=1:GOSUB 256:A$=D$
81 I=2:GOSUB 256:B$=D$
82 I=3:GOSUB 256:C$=D$
83 I=4:GOSUB 256:TYPE$=D$
84 IF A$="C"THEN IF B$="C" THEN IF C$="3" THEN 90
85 TYPE$="S"
86 IF RANGE=4 THEN 90
87 IF RANGE<>4 THEN CLOSE8:PRINT".IMG HEADER NOT FOUND.":END
88 FOR J=5 TO RANGE :GOSUB256:NEXT
90 OPEN9,8,9,"0:"+OF$+","+TYPE$+",W"
95 INPUT#15,E,E$,T,S:IF E>19THEN CLOSE8:CLOSE9:GOTO20
100 FORI=728 TO 767:READ D:POKEI,D:NEXT
105 SYS 728 :END
110 DATA 162, 8, 32,198,255, 32,207,255
115 DATA 72,164,144,162, 9, 32,201,255
120 DATA 104, 32,210,255,192, 0,240,232
125 DATA 169, 8, 32,195,255,169, 9, 32
130 DATA 195,255, 32,204,255, 76,204,255
256 GET#8,D$:IF D$="" THEN D$=CHR$(0)
257 RETURN